import bianliang from "./bianliang.js";
class BackGround {
	/*js里面的构造方法*/
	constructor() {
	    this.x = 0;
		this.y = -850;
		this.img = bianliang.resObj[0];
	}
	
	draw(ctx) {
		this.move();
		ctx.drawImage(this.img, this.x, this.y);
	}
	
	move() {
		this.y += 2.5;
		if (this.y >= 0) {
			this.y = -850;
		}
	}
}

export default BackGround;